
//
//  JMMyBindingCell.m
//  jiMuOperate
//
//  Created by 胡梅方 on 16/5/9.
//  Copyright © 2016年 jinXinFengLi. All rights reserved.
//

#import "JMMyBindingCell.h"
#define LabelFont 12
@implementation JMMyBindingCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createViews];
    }
    return self;
}

-(void)createViews
{
    CGFloat labelX = 0;
    //    CGFloat labelY = 15;
    CGFloat nameX = 10;
    CGFloat labelW=100;
    CGFloat labelH = 20;
    UIView *headView = [[UIView alloc]initWithFrame:CGRectMake(labelX, labelX, 320, nameX)];
    self.headView = headView;
    [self addSubview:headView];
    
    UIImageView *personImg = [ARC createImageViewWithFrame:CGRectMake(15, labelH, 50, 50) ImageName:@"fth"];
    [self addSubview:personImg];
    self.personImage = personImg;
    
    
    UILabel *nameLab = [ARC createLabelWithFrame:CGRectMake(90, labelH, labelW, labelH) Font:13 Text:nil];
    self.nameLabel = nameLab;
    [self addSubview:nameLab];

    UILabel *leverL = [ARC createLabelWithFrame:CGRectMake(210, labelH, 100, labelH) Font:LabelFont Text:nil];
    self.levelLab = leverL;
//   self.levelLab.text = @"级别:";
    [self addSubview:leverL];
    

    UILabel *winprobilyty = [ARC createLabelWithFrame:CGRectMake(90,labelH*2,30,labelH) Font:LabelFont Text:@"胜率:"];
    self.winProbability = winprobilyty;
    [self addSubview:winprobilyty];
    
    UILabel *winProbilNum = [ARC createLabelWithFrame:CGRectMake(120, labelH*2, labelH*2, labelH) Font:13 Text:nil];
    self.winProbaNum = winProbilNum;
    [self addSubview:winProbilNum];
    
    
    
    UILabel *bindingL = [ARC createLabelWithFrame:CGRectMake(210, labelH*2, 100, labelH) Font:13 Text:nil];
    self.bindingLab = bindingL;
    
    [self addSubview:bindingL];
    
    UILabel *bindingNumL = [ARC createLabelWithFrame:CGRectMake(250,labelH*2, labelW, labelH) Font:13 Text:nil];
    self.bindingNumL = bindingNumL;
    [bindingL addSubview:bindingNumL];
//    bindingL.text = [NSString stringWithFormat:@"绑定:"];
    UIImageView *lineImg = [[UIImageView alloc]initWithFrame:CGRectMake(0,70, 320, 1)];
    lineImg.image = [UIImage imageNamed:@"halvingline_2"];
    [self.contentView addSubview:lineImg];
    lineImg.frame = [ToolViewAndData MyAutoLayout:lineImg];
    
    self.headView.frame = [ToolViewAndData MyAutoLayout:headView];
//    self.gradeImage.frame = [ToolViewAndData MyAutoLayout:self.gradeImage];
//    self.gradeNumber.frame = [ToolViewAndData MyAutoLayout:self.gradeNumber];
    self.nameLabel.frame = [ToolViewAndData MyAutoLayout:self.nameLabel];
    self.bindingLab.frame =[ToolViewAndData MyAutoLayout:self.bindingLab];
    self.levelLab.frame = [ToolViewAndData MyAutoLayout:self.levelLab];
    self.levelImag.frame = [ToolViewAndData MyAutoLayout:self.levelImag];
    
    self.winProbability.frame = [ToolViewAndData MyAutoLayout:self.winProbability];
    self.winProbaNum.frame = [ToolViewAndData MyAutoLayout:self.winProbaNum];
    
//    
//    self.gradeNumber.textColor = [UIColor whiteColor];
    
    self.nameLabel.textColor = [UIColor blackColor];
    self.headView.backgroundColor = BACKCOLOR;
    self.bindingLab.textColor = [UIColor blackColor];
    self.bindingNumL.textColor = [UIColor blackColor];
    self.levelLab.textColor = [UIColor blackColor];
    
    self.winProbability.textColor = [UIColor blackColor];
    self.winProbaNum.textColor = [UIColor redColor];
    
    self.nameLabel.textAlignment = NSTextAlignmentLeft;
    self.bindingLab.textAlignment = NSTextAlignmentLeft;
    self.levelLab.textAlignment = NSTextAlignmentLeft;
    self.winProbability.textAlignment = NSTextAlignmentRight;
    self.winProbaNum.textAlignment = NSTextAlignmentLeft;
}
@end
